t = codesters.Teacher()
lists = t.find_text("[")
fors = t.find_block("for")
try:
tval1 = lists[0][1].lower().replace(' ','')
except:
tval1 = "DNE"
try:
tval2 = fors[0][1].lower().replace(' ','')
except:
tval2 = "DNE"
t1 = TestObjective()
t1.add_success('my_list=[-150,-50,50,150]' in tval1, "Great Job!")
t1.add_failure(tval1 == "DNE", "Did you copy or type in the list code from the instructions?")
t1.add_failure(tval1 != "DNE" and 'my_list=' not in tval1, "Did you name your list my_list?")
t1.add_failure(tval1 != "DNE" and '[-150,-50,50,150]' not in tval1, "Did you copy or type in the exact list from the instructions?")
t2 = TestObjective()
t2.add_success('forvalueinmy_list:' in tval2, "Great Job!")
t2.add_failure(tval2 == "DNE", "Did you add a Loop through List?")
tester = TestManager()
tester.add_test_list([t1, t2])
tester.run_tests()
tester.display_first_feedback()
Are you already running a Codesters project in another tab or window?
Micro:bit can only connect to one web page at a time.
Try stopping other Codesters projects or closing
other tabs or windows that may be using your Micro:bit.
If that doesn't fix the problem try disconnecting your Micro:bit,
reloading this page, and reconnecting your Micro:bit.